package com.songqintuan.platform.genl;

import javax.faces.application.FacesMessage;
import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;
import javax.faces.model.SelectItem;

import com.songqintuan.common.util.MessageFactory;
import com.songqintuan.platform.common.constant.PlatformConstants;

@SuppressWarnings("serial")
@ManagedBean(name="existSex")
@ApplicationScoped
public class ExistSexBean implements java.io.Serializable {

	private SelectItem[] items;


	public SelectItem[] getItems() {
		return items;
	}


	public void setItems(SelectItem[] items) {
		this.items = items;
	}


	public ExistSexBean() {
		
		SelectItem[] tempItems = new SelectItem[2];
		//set select default 
		
		String maleN18 = MessageFactory.getMessage(PlatformConstants.USER_BUNDLE_NAME,"sex.male.value", FacesMessage.SEVERITY_ERROR).getDetail();
		tempItems[0] = new SelectItem("M",maleN18);
		String femaleN18 = MessageFactory.getMessage(PlatformConstants.USER_BUNDLE_NAME,"sex.female.value", FacesMessage.SEVERITY_ERROR).getDetail();
		tempItems[1] = new SelectItem("F",femaleN18);

		this.setItems(tempItems);
	}
}
